package br.ufrj.dcc.smarthotel.listeners;

import android.view.View;
import android.view.View.OnClickListener;
import br.ufrj.dcc.smarthotel.R;
import br.ufrj.dcc.smarthotel.activities.SignUpActivity;
import br.ufrj.dcc.smarthotel.activities.SmartHotelActivity;

public class SmartHotelListener implements OnClickListener {

	private SmartHotelActivity activity;
	
	public SmartHotelListener(SmartHotelActivity activity) {
		this.activity = activity;
	}
	
	public void onClick(View v) {
		switch (v.getId()) {
			case R.id.txtSignUp:
				this.SignUpClick(v);
				break;
			case R.id.btnSubmit:
				this.SignUpLogin(v);
				break;
		}
	}
	
	private void SignUpClick(View v) {
		this.activity.startActivity(SignUpActivity.class);
	}

	private void SignUpLogin(View v) {
		this.activity.Login();
	}
}
